package com.wang.test.demo.putong;

import com.wang.test.demo.entity.Test;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @author wangzhenjun
 * @date 2022/9/27 10:59
 */
public class BigNum {
    public static void main(String[] args) {

        BigDecimal bigDecimal = new BigDecimal("10000.90");
        System.out.println(bigDecimal.stripTrailingZeros().toString());
        System.out.println(new BigDecimal(bigDecimal.stripTrailingZeros().toString()));


        String stockInNumString = "sssss";
        boolean matches = stockInNumString.matches("^[+]{0,1}(\\d+)$");
        if (!matches) {
            System.out.println("sssss");
        }

        List<Test> l = new ArrayList<>();

        Test test = new Test();
        test.setName("jj");
        l.add(test);
        List<Test> ll = new ArrayList<>();

        BeanUtils.copyProperties(l,ll);
        System.out.println(ll);
    }
}
